home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / dlasd2.z / dlasd2
Encoding:
Text File  |  2002-10-03  |  9.3 KB  |  265 lines

  1.  
  2.  
  3.  
  4. DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DLASD2 - merge the two sets of singular values together into a single
  10.      sorted set
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE DLASD2( NL, NR, SQRE, K, D, Z, ALPHA, BETA, U, LDU, VT, LDVT,
  14.                         DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX, IDXC, IDXQ,
  15.                         COLTYP, INFO )
  16.  
  17.          INTEGER        INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
  18.  
  19.          DOUBLE         PRECISION ALPHA, BETA
  20.  
  21.          INTEGER        COLTYP( * ), IDX( * ), IDXC( * ), IDXP( * ), IDXQ( * )
  22.  
  23.          DOUBLE         PRECISION D( * ), DSIGMA( * ), U( LDU, * ), U2( LDU2,
  24.                         * ), VT( LDVT, * ), VT2( LDVT2, * ), Z( * )
  25.  
  26. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  27.      These routines are part of the SCSL Scientific Library and can be loaded
  28.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  29.      directs the linker to use the multi-processor version of the library.
  30.  
  31.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  32.      4 bytes (32 bits). Another version of SCSL is available in which integers
  33.      are 8 bytes (64 bits).  This version allows the user access to larger
  34.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  35.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  36.      only one of the two versions; 4-byte integer and 8-byte integer library
  37.      calls cannot be mixed.
  38.  
  39. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  40.      DLASD2 merges the two sets of singular values together into a single
  41.      sorted set. Then it tries to deflate the size of the problem. There are
  42.      two ways in which deflation can occur:  when two or more singular values
  43.      are close together or if there is a tiny entry in the Z vector.  For each
  44.      such occurrence the order of the related secular equation problem is
  45.      reduced by one.
  46.  
  47.      DLASD2 is called from DLASD1.
  48.  
  49.  
  50. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  51.      NL     (input) INTEGER
  52.             The row dimension of the upper block.  NL >= 1.
  53.  
  54.      NR     (input) INTEGER
  55.             The row dimension of the lower block.  NR >= 1.
  56.  
  57.      SQRE   (input) INTEGER
  58.             = 0: the lower block is an NR-by-NR square matrix.
  59.             = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))
  71.  
  72.  
  73.  
  74.             The bidiagonal matrix has N = NL + NR + 1 rows and M = N + SQRE >=
  75.             N columns.
  76.  
  77.      K      (output) INTEGER
  78.             Contains the dimension of the non-deflated matrix, This is the
  79.             order of the related secular equation. 1 <= K <=N.
  80.  
  81.      D      (input/output) DOUBLE PRECISION array, dimension(N)
  82.             On entry D contains the singular values of the two submatrices to
  83.             be combined.  On exit D contains the trailing (N-K) updated
  84.             singular values (those which were deflated) sorted into increasing
  85.             order.
  86.  
  87.      ALPHA  (input) DOUBLE PRECISION
  88.             Contains the diagonal element associated with the added row.
  89.  
  90.      BETA   (input) DOUBLE PRECISION
  91.             Contains the off-diagonal element associated with the added row.
  92.  
  93.      U      (input/output) DOUBLE PRECISION array, dimension(LDU,N)
  94.             On entry U contains the left singular vectors of two submatrices
  95.             in the two square blocks with corners at (1,1), (NL, NL), and
  96.             (NL+2, NL+2), (N,N).  On exit U contains the trailing (N-K)
  97.             updated left singular vectors (those which were deflated) in its
  98.             last N-K columns.
  99.  
  100.      LDU    (input) INTEGER
  101.             The leading dimension of the array U.  LDU >= N.
  102.  
  103.      Z      (output) DOUBLE PRECISION array, dimension(N)
  104.             On exit Z contains the updating row vector in the secular
  105.             equation.
  106.  
  107.             DSIGMA (output) DOUBLE PRECISION array, dimension (N) Contains a
  108.             copy of the diagonal elements (K-1 singular values and one zero)
  109.             in the secular equation.
  110.  
  111.      U2     (output) DOUBLE PRECISION array, dimension(LDU2,N)
  112.             Contains a copy of the first K-1 left singular vectors which will
  113.             be used by DLASD3 in a matrix multiply (DGEMM) to solve for the
  114.             new left singular vectors. U2 is arranged into four blocks. The
  115.             first block contains a column with 1 at NL+1 and zero everywhere
  116.             else; the second block contains non-zero entries only at and above
  117.             NL; the third contains non-zero entries only below NL+1; and the
  118.             fourth is dense.
  119.  
  120.      LDU2   (input) INTEGER
  121.             The leading dimension of the array U2.  LDU2 >= N.
  122.  
  123.      VT     (input/output) DOUBLE PRECISION array, dimension(LDVT,M)
  124.             On entry VT' contains the right singular vectors of two
  125.             submatrices in the two square blocks with corners at (1,1), (NL+1,
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))
  137.  
  138.  
  139.  
  140.             NL+1), and (NL+2, NL+2), (M,M).  On exit VT' contains the trailing
  141.             (N-K) updated right singular vectors (those which were deflated)
  142.             in its last N-K columns.  In case SQRE =1, the last row of VT
  143.             spans the right null space.
  144.  
  145.      LDVT   (input) INTEGER
  146.             The leading dimension of the array VT.  LDVT >= M.
  147.  
  148.      VT2    (output) DOUBLE PRECISION array, dimension(LDVT2,N)
  149.             VT2' contains a copy of the first K right singular vectors which
  150.             will be used by DLASD3 in a matrix multiply (DGEMM) to solve for
  151.             the new right singular vectors. VT2 is arranged into three blocks.
  152.             The first block contains a row that corresponds to the special 0
  153.             diagonal element in SIGMA; the second block contains non-zeros
  154.             only at and before NL +1; the third block contains non-zeros only
  155.             at and after  NL +2.
  156.  
  157.      LDVT2  (input) INTEGER
  158.             The leading dimension of the array VT2.  LDVT2 >= M.
  159.  
  160.      IDXP   (workspace) INTEGER array, dimension(N)
  161.             This will contain the permutation used to place deflated values of
  162.             D at the end of the array. On output IDXP(2:K)
  163.             points to the nondeflated D-values and IDXP(K+1:N) points to the
  164.             deflated singular values.
  165.  
  166.      IDX    (workspace) INTEGER array, dimension(N)
  167.             This will contain the permutation used to sort the contents of D
  168.             into ascending order.
  169.  
  170.      IDXC   (output) INTEGER array, dimension(N)
  171.             This will contain the permutation used to arrange the columns of
  172.             the deflated U matrix into three groups:  the first group contains
  173.             non-zero entries only at and above NL, the second contains non-
  174.             zero entries only below NL+2, and the third is dense.
  175.  
  176.             COLTYP (workspace/output) INTEGER array, dimension(N) As
  177.             workspace, this will contain a label which will indicate which of
  178.             the following types a column in the U2 matrix or a row in the VT2
  179.             matrix is:
  180.             1 : non-zero in the upper half only
  181.             2 : non-zero in the lower half only
  182.             3 : dense
  183.             4 : deflated
  184.  
  185.             On exit, it is an array of dimension 4, with COLTYP(I) being the
  186.             dimension of the I-th type columns.
  187.  
  188.      IDXQ   (input) INTEGER array, dimension(N)
  189.             This contains the permutation which separately sorts the two sub-
  190.             problems in D into ascending order.  Note that entries in the
  191.             first hlaf of this permutation must first be moved one position
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD2222((((3333SSSS))))
  203.  
  204.  
  205.  
  206.             backward; and entries in the second half must first have NL+1
  207.             added to their values.
  208.  
  209.      INFO   (output) INTEGER
  210.             = 0:  successful exit.
  211.             < 0:  if INFO = -i, the i-th argument had an illegal value.
  212.  
  213. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  214.      Based on contributions by
  215.         Ming Gu and Huan Ren, Computer Science Division, University of
  216.         California at Berkeley, USA
  217.  
  218.  
  219. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  220.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  221.  
  222.      This man page is available only online.
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.